package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 站内消息表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_site_messages")
public class SiteMessages extends Model<SiteMessages> {

    private static final long serialVersionUID = 1L;

    /**
     * 站内消息唯一标识
     */
    @TableId("message_id")
    private Long messageId;
    /**
     * 接收用户ID（关联用户表）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 消息类型ID（关联消息类型表）
     */
    @TableField("type_id")
    private Long typeId;
    /**
     * 消息标题
     */
    private String title;
    /**
     * 消息内容
     */
    private String content;
    /**
     * 是否已读（0：未读，1：已读）
     */
    @TableField("is_read")
    private Integer isRead;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getMessageId() {
        return messageId;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "SiteMessages{" +
        ", messageId=" + messageId +
        ", userId=" + userId +
        ", typeId=" + typeId +
        ", title=" + title +
        ", content=" + content +
        ", isRead=" + isRead +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
